public class PlayerStateBehavior_BaseLineThrow : AbstractPlayerStateBehavior
{
	public static PlayerStateBehavior_BaseLineThrow instance;

	private PlayerStateBehavior_BaseLineThrow()
	{
	}

	public static PlayerStateBehavior_BaseLineThrow getInstance()
	{
		if (instance == null)
		{
			instance = new PlayerStateBehavior_BaseLineThrow();
		}
		return instance;
	}

	public override void enter(Player owner)
	{
		base.enter(owner);
		if (owner.teamType == TeamType.COMPUTER)
		{
			for (int i = 0; i < 5; i++)
			{
				if (owner.team.getPlayer(i).AI.isInState(PlayerAIState_AcceptBaseLineBall.getInstance()))
				{
					Instance<Ball>.instance.pass_player_catch_ball = owner.team.getPlayer(i);
					break;
				}
			}
		}
		else
		{
			Instance<Ball>.instance.pass_player_catch_ball = owner.team.getPlayer_ClosestTeammate(owner);
			if (Instance<Ball>.instance.pass_player_catch_ball == owner.team.getPlayer_ControlBall())
			{
				for (int j = 0; j < 5; j++)
				{
					if (owner.team.getPlayer(j).AI.isInState(PlayerAIState_AcceptBaseLineBall.getInstance()) && owner.team.getPlayer(j) != owner.team.getPlayer_ControlBall())
					{
						owner.team.getPlayer(j).AI.do_offense_findpos();
						break;
					}
				}
			}
		}
		owner.LookAt(Instance<Ball>.instance.pass_player_catch_ball.getPosition());
		owner.playAnimation(AnimationName.player_baseline, 1f, -1f);
		owner.getBallInHand();
		Instance<Ball>.instance.do_baseline();
	}

	public override void fixedUpdate(Player owner)
	{
		base.fixedUpdate(owner);
		if (!owner.IsPlayingAnimation())
		{
			owner.AI.do_baseline_after();
		}
	}
}
